# Tanım: Google tarafından popüler ve güvenilir web tarayıcısı (kararlı Kanal)
# URL: https://www.google.com/chrome
# Paketçi: Oguzhan_DUYAR
# Gerekler: alsa-lib gtk3 cups xorg-libxtst nss
# Grup: ağ

isim=google-chrome
surum=69.0.3497.92
devir=1

kaynak=(https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb::google-chrome-stable_${surum}_amd64.deb 
         google-chrome-stable.sh )

derle() 
{
  ar x google-chrome-stable_${surum}_amd64.deb
  bsdtar -xf data.tar.xz -C "$PKG/"

  
  # Launcher
  install -m755 google-chrome-stable.sh "$PKG"/usr/bin/google-chrome-stable

  # Icons
  for i in 16x16 22x22 24x24 32x32 48x48 64x64 128x128 256x256; do
    install -Dm644 "$PKG"/opt/google/chrome/product_logo_${i/x*}.png \
                   "$PKG"/usr/share/icons/hicolor/$i/apps/google-chrome.png
  done

 
 
  sed -i "/Exec=/i\StartupWMClass=Google-chrome" "$PKG"/usr/share/applications/google-chrome.desktop


  rm -r "$PKG"/etc/cron.daily/ "$PKG"/opt/google/chrome/cron/
  rm "$PKG"/opt/google/chrome/product_logo_*.png
}


